import request from '@/utils/request'

export default {
  list() {
     return request({
       url: '/admin/edu/teacher/findAll',
       method: 'get'
     })
   },
  pageList(currentPage,pageSize,searchObj){
    return request({
      url: `/admin/edu/teacher/findPage/${currentPage}/${pageSize}`,
      method: 'get',
      params: searchObj
    })
  },
  removeById(id) {
    return request({
      url: `/admin/edu/teacher/remove/${id}`,
      method: 'delete',
    })
  },
  save(teacher) {
    return request({
      url: `/admin/edu/teacher/save`,
      method: 'post',
      data: teacher
    })
  },
  getById(id) {
    return request({
      url: `/admin/edu/teacher/get/${id}`,
      method: 'get'
    })
  },
  updateById(teacher) {
    return request({
      url: '/admin/edu/teacher/update',
      method: 'post',
      data: teacher
    })
  },
  batchRemoves(idList){
    return request({
      url: 'admin/edu/teacher/batch-remove',
      method: 'delete',
      data: idList
    })
  },
  selectByKey(key) {
    return request({
      url: `/admin/edu/teacher/list/name/${key}`,
      method: 'get'
    })
  }

}
